3.145 \(\int (a+b \sin (c+d x)) \tan ^4(c+d x) \, dx\)

Optimal. Leaf size=72 \[ \frac {a \tan ^3(c+d x)}{3 d}-\frac {a \tan (c+d x)}{d}+a x-\frac {b \cos (c+d x)}{d}+\frac {b \sec ^3(c+d x)}{3 d}-\frac {2 b \sec (c+d x)}{d} \]

[Out]

a*x-b*cos(d*x+c)/d-2*b*sec(d*x+c)/d+1/3*b*sec(d*x+c)^3/d-a*tan(d*x+c)/d+1/3*a*tan(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {2722, 3473, 8, 2590, 270} \[ \frac {a \tan ^3(c+d x)}{3 d}-\frac {a \tan (c+d x)}{d}+a x-\frac {b \cos (c+d x)}{d}+\frac {b \sec ^3(c+d x)}{3 d}-\frac {2 b \sec (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*Sin[c + d*x])*Tan[c + d*x]^4,x]

[Out]

a*x - (b*Cos[c + d*x])/d - (2*b*Sec[c + d*x])/d + (b*Sec[c + d*x]^3)/(3*d) - (a*Tan[c + d*x])/d + (a*Tan[c + d
*x]^3)/(3*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2590

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*tan[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[f^(-1), Subst[Int[(1 - x^2
)^((m + n - 1)/2)/x^n, x], x, Cos[e + f*x]], x] /; FreeQ[{e, f}, x] && IntegersQ[m, n, (m + n - 1)/2]

Rule 2722

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((g_.)*tan[(e_.) + (f_.)*(x_)])^(p_.), x_Symbol] :> Int[Expan
dIntegrand[(g*Tan[e + f*x])^p, (a + b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, e, f, g, p}, x] && NeQ[a^2 - b^2
, 0] && IGtQ[m, 0]

Rule 3473

Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(b*Tan[c + d*x])^(n - 1))/(d*(n - 1)), x] - Dis
t[b^2, Int[(b*Tan[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]

Rubi steps

\begin {align*} \int (a+b \sin (c+d x)) \tan ^4(c+d x) \, dx &=\int \left (a \tan ^4(c+d x)+b \sin (c+d x) \tan ^4(c+d x)\right ) \, dx\\ &=a \int \tan ^4(c+d x) \, dx+b \int \sin (c+d x) \tan ^4(c+d x) \, dx\\ &=\frac {a \tan ^3(c+d x)}{3 d}-a \int \tan ^2(c+d x) \, dx-\frac {b \operatorname {Subst}\left (\int \frac {\left (1-x^2\right )^2}{x^4} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-\frac {a \tan (c+d x)}{d}+\frac {a \tan ^3(c+d x)}{3 d}+a \int 1 \, dx-\frac {b \operatorname {Subst}\left (\int \left (1+\frac {1}{x^4}-\frac {2}{x^2}\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=a x-\frac {b \cos (c+d x)}{d}-\frac {2 b \sec (c+d x)}{d}+\frac {b \sec ^3(c+d x)}{3 d}-\frac {a \tan (c+d x)}{d}+\frac {a \tan ^3(c+d x)}{3 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 81, normalized size = 1.12 \[ \frac {a \tan ^{-1}(\tan (c+d x))}{d}+\frac {a \tan ^3(c+d x)}{3 d}-\frac {a \tan (c+d x)}{d}-\frac {b \cos (c+d x)}{d}+\frac {b \sec ^3(c+d x)}{3 d}-\frac {2 b \sec (c+d x)}{d} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sin[c + d*x])*Tan[c + d*x]^4,x]

[Out]

(a*ArcTan[Tan[c + d*x]])/d - (b*Cos[c + d*x])/d - (2*b*Sec[c + d*x])/d + (b*Sec[c + d*x]^3)/(3*d) - (a*Tan[c +
 d*x])/d + (a*Tan[c + d*x]^3)/(3*d)

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 73, normalized size = 1.01 \[ \frac {3 \, a d x \cos \left (d x + c\right )^{3} - 3 \, b \cos \left (d x + c\right )^{4} - 6 \, b \cos \left (d x + c\right )^{2} - {\left (4 \, a \cos \left (d x + c\right )^{2} - a\right )} \sin \left (d x + c\right ) + b}{3 \, d \cos \left (d x + c\right )^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(d*x+c))*tan(d*x+c)^4,x, algorithm="fricas")

[Out]

1/3*(3*a*d*x*cos(d*x + c)^3 - 3*b*cos(d*x + c)^4 - 6*b*cos(d*x + c)^2 - (4*a*cos(d*x + c)^2 - a)*sin(d*x + c)
+ b)/(d*cos(d*x + c)^3)

________________________________________________________________________________________

giac [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(d*x+c))*tan(d*x+c)^4,x, algorithm="giac")

[Out]

Timed out

________________________________________________________________________________________

maple [A]  time = 0.16, size = 98, normalized size = 1.36 \[ \frac {a \left (\frac {\left (\tan ^{3}\left (d x +c \right )\right )}{3}-\tan \left (d x +c \right )+d x +c \right )+b \left (\frac {\sin ^{6}\left (d x +c \right )}{3 \cos \left (d x +c \right )^{3}}-\frac {\sin ^{6}\left (d x +c \right )}{\cos \left (d x +c \right )}-\left (\frac {8}{3}+\sin ^{4}\left (d x +c \right )+\frac {4 \left (\sin ^{2}\left (d x +c \right )\right )}{3}\right ) \cos \left (d x +c \right )\right )}{d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sin(d*x+c))*tan(d*x+c)^4,x)

[Out]

1/d*(a*(1/3*tan(d*x+c)^3-tan(d*x+c)+d*x+c)+b*(1/3*sin(d*x+c)^6/cos(d*x+c)^3-sin(d*x+c)^6/cos(d*x+c)-(8/3+sin(d
*x+c)^4+4/3*sin(d*x+c)^2)*cos(d*x+c)))

________________________________________________________________________________________

maxima [A]  time = 1.70, size = 65, normalized size = 0.90 \[ \frac {{\left (\tan \left (d x + c\right )^{3} + 3 \, d x + 3 \, c - 3 \, \tan \left (d x + c\right )\right )} a - b {\left (\frac {6 \, \cos \left (d x + c\right )^{2} - 1}{\cos \left (d x + c\right )^{3}} + 3 \, \cos \left (d x + c\right )\right )}}{3 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(d*x+c))*tan(d*x+c)^4,x, algorithm="maxima")

[Out]

1/3*((tan(d*x + c)^3 + 3*d*x + 3*c - 3*tan(d*x + c))*a - b*((6*cos(d*x + c)^2 - 1)/cos(d*x + c)^3 + 3*cos(d*x
+ c)))/d

________________________________________________________________________________________

mupad [B]  time = 10.18, size = 110, normalized size = 1.53 \[ a\,x+\frac {2\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7-\frac {14\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{3}-\frac {14\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{3}-\frac {32\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}+2\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {16\,b}{3}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}^3\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(tan(c + d*x)^4*(a + b*sin(c + d*x)),x)

[Out]

a*x + ((16*b)/3 + 2*a*tan(c/2 + (d*x)/2) - (14*a*tan(c/2 + (d*x)/2)^3)/3 - (14*a*tan(c/2 + (d*x)/2)^5)/3 + 2*a
*tan(c/2 + (d*x)/2)^7 - (32*b*tan(c/2 + (d*x)/2)^2)/3)/(d*(tan(c/2 + (d*x)/2)^2 - 1)^3*(tan(c/2 + (d*x)/2)^2 +
 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sin {\left (c + d x \right )}\right ) \tan ^{4}{\left (c + d x \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(d*x+c))*tan(d*x+c)**4,x)

[Out]

Integral((a + b*sin(c + d*x))*tan(c + d*x)**4, x)

________________________________________________________________________________________